﻿<?xml version="1.0" ?>
<lz:project xmlns:lz="http://schemas.icitadel.com/Lazarus/Source.xsd"
	name="Lazarus" namespace="OR.Lazarus" owner="dbo" user="jmuharsky" businessconcept="Rules" namespaceprefix="lcz" namespaceuri="http://schemas.icitadel.com/Lazarus/Rules.xsd">
	<lz:description>Defines the structure of a Config file in the Lazarus compiler.</lz:description>
	<lz:datasource location="WARREN" schema="Config" user="gkirrel" password="thx1138" />
	<lz:defaults>
		<lz:fields>
			<lz:field name="Name" alias="name" type="Varchar" size="100">
				<lz:indexes>
					<lz:index type="Primary" />
				</lz:indexes>
			</lz:field>
			<lz:field name="Description" alias="description" type="Text" />
		</lz:fields>
	</lz:defaults>
	<lz:objects>
		<lz:object name="Rulesheet">
			<lz:description>Defines a set of rules governing the compilation process.</lz:description>
			<lz:collections>
				<lz:collection name="Rulesets" object="Ruleset" />
			</lz:collections>
		</lz:object>
		<lz:object name="Ruleset">
			<lz:description>Defines a named set of rules.  Different tiers may utilize different rulesets.</lz:description>
			<lz:collections>
				<lz:collection name="Rules" object="Rule" />
			</lz:collections>
		</lz:object>
		<lz:object name="Rule">
			<lz:description>Defines a set of rules for a particular entity type.  This allows different naming conventions and settings for Tables vs. OOP Objects, etc.</lz:description>
			<lz:fields>
				<lz:field name="Type" type="Varchar" size="255" required="true" />
				<lz:field name="NamingRule">
					<lz:indexes>
						<lz:index type="Foreign" object="NamingRule" alias="naming-rule" />
					</lz:indexes>
				</lz:field>
				<lz:field name="PKRule">
					<lz:indexes>
						<lz:index type="Foreign" object="PKRule" alias="pk-rule" />
					</lz:indexes>
				</lz:field>
				<lz:field name="FKRule">
					<lz:indexes>
						<lz:index type="Foreign" object="FKRule" alias="fk-rule" />
					</lz:indexes>
				</lz:field>
			</lz:fields>
		</lz:object>
		<lz:object name="NamingRule" alias="pk-rule">
			<lz:description>Defines rules about the naming of an entity.</lz:description>
			<lz:fields>
				<lz:field name="UseEntityName" alias="use-entity-name" type="Bit" required="true" default="true" />
				<lz:field name="Prefix" type="Varchar" size="20" required="false" />
				<lz:field name="Suffix" type="Varchar" size="20" required="false" />
			</lz:fields>
		</lz:object>
		<lz:object name="PKRule" alias="pk-rule" title-field="Type">
			<lz:description>Defines rules about the generation of Primary Keys.</lz:description>
			<lz:fields>
				<lz:field name="Type" type="Varchar" size="255" required="false" />
				<lz:field name="UseEntityName" alias="use-entity-name" type="Bit" required="true" default="true" />
				<lz:field name="Prefix" type="Varchar" size="20" required="false" />
				<lz:field name="Suffix" type="Varchar" size="20" required="false" />
			</lz:fields>
		</lz:object>
		<lz:object name="FKRule" alias="fk-rule">
			<lz:description>Defines rules about the generation of Primary Keys.</lz:description>
			<lz:fields>
				<lz:field name="UseEntityName" alias="use-entity-name" type="Bit" required="true" default="false" />
				<lz:field name="Prefix" type="Varchar" size="20" required="false" />
				<lz:field name="Suffix" type="Varchar" size="20" required="false" />
			</lz:fields>
		</lz:object>
		<lz:object name="IndexRule" alias="index-rule">
			<lz:description>Defines rules about the generation of Primary Keys.</lz:description>
			<lz:fields>
				<lz:field name="UseEntityName" alias="use-entity-name" type="Bit" required="true" default="false" />
				<lz:field name="Prefix" type="Varchar" size="20" required="false" />
				<lz:field name="Suffix" type="Varchar" size="20" required="false" />
			</lz:fields>
		</lz:object>
		<lz:object name="ReferenceRule" alias="reference-rule">
			<lz:description>Defines rules about the generation of References.</lz:description>
			<lz:fields>
				<lz:field name="UseEntityName" alias="use-entity-name" type="Bit" required="true" default="false" />
				<lz:field name="Prefix" type="Varchar" size="20" required="false" />
				<lz:field name="Suffix" type="Varchar" size="20" required="false" />
			</lz:fields>
		</lz:object>
	</lz:objects>
</lz:project>